<%@ page isELIgnored="false"%>
<%@ page language="java" contentType="text/html; charset=utf-8"  
    pageEncoding="UTF-8"%>  

<%@ taglib prefix="s" uri="/struts-tags"%>
<html><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>KCMS</title>
 <jsp:include page="../../iframecommon.jsp"></jsp:include>
 <script type="text/javascript">
function myCheck(){
	var inputs = document.getElementsByName('checkClass');
	  var isChecked = false;
	  for (var i = 0, l = inputs.length; i < l; i++) {
	      if (inputs[i].checked == true) {
	          isChecked = true;
	      }
	  }
	  if (!isChecked) {
		alert('至少选择一个班级');
	  	return false;
	  	}
	  
	  if(document.form1.descMessage.value=="")
      {
       alert("作业名称不能为空");
       document.form1.descMessage.focus();
       return false;
      }
	  return true;
}
</script>
 </head>
 <body>
 
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="main-box">
<header class="main-box-header clearfix">
<h1>创建新教学通知</h1>
</header>
<div class="alert alert-success">
<i class="fa fa-check-circle fa-fw fa-lg"></i>
请再选择您需要的所教授的班级
</div> 
 
 
 

<div class="alert alert-info">
<i class="fa fa-check-circle fa-fw fa-lg"></i>
请选择班级并填写通知信息

<div class="table-responsive">
<s:form action="message_addMessage" method="post" id="form1" onsubmit="return myCheck();">
<table class="table">
<thead>
<tr>
<th><span></span></th>
<th><span>课程名称</span></th>
<th><span>课程班级</span></th>
</tr>
</thead>
<tbody>
<s:iterator value="teachStudents" id="t">
<tr>
<td><div class="checkbox-nice"><input class="form-control"  type="checkbox" name="checkClass" id="${t.id.cid}!${t.id.csn}" value="${t.id.cid}!${t.id.csn}"/><label for="${t.id.cid}!${t.id.csn}"></label></div></td>
<td>${t.id.cname}</td>
<td>${t.id.csn}</td>
</tr>
</s:iterator>
</tbody>
</table>
</div>
</div>


<div class="alert alert-info">
<i class="fa fa-check-circle fa-fw fa-lg"></i>
请输入要发布的通知消息
<textarea class="form-control"  name="descMessage"></textarea>

<s:submit value="添加通知" align="center" class="btn btn-success" ></s:submit>
</div>
</s:form>
</div></div>
</body></html>